<?php
(!defined('IN_TOA') || !defined('IN_ADMIN')) && exit('Access Denied!');
/*
	[天生创想] (C)2008-2011 515158 Inc.
	This is NOT a freeware, use is subject to license terms
    URL:http://www.515158.com/
*/


get_config_keytable("istration_conference_edit");
empty($do) && $do = 'list';
if ($do == 'edit') {
	$id = getGP('id','G','int');
	$conference = $db->fetch_one_array("SELECT * FROM ".DB_TABLEPRE."conference  WHERE id = '$id'");
	include_once('template/edit.php');

} elseif ($do == 'save') {
	
	$savetype = getGP('savetype','P');
	$id = getGP('id','P','int');
	$title = getGP('title','P');
	$subject = getGP('subject','P');
	$content = getGP('content','P');
	$attendance = getGP('participation','P');
	$startdate = getGP('startdate','P')." ".getGP('starttime1','P').":".getGP('starttime2','P');
	$enddate = getGP('enddate','P')." ".getGP('endtime1','P').":".getGP('endtime2','P');
	$conferenceroom = getGP('conferenceroom','P');
	$otype = getGP('otype','P');
	//////////////
	$staffidsms=getGP('staffid','P');
	$conference = array(
		'title' => $title,
		'subject' => $subject,
		'content' => $content,
		'attendance' => $attendance,
		'startdate' => $startdate,
		'enddate' => $enddate,
		'conferenceroom' => $conferenceroom,
		'otype' => $otype
	);
	update_db('conference',$conference, array('id' => $id));
	
	$content=$title.get_inc_log(1).$subject.get_inc_log(1).$content.get_inc_log(1).$appperson.get_inc_log(1).$attendance.get_inc_log(1).$startdate.get_inc_log(1).$enddate.get_inc_log(1).$conferenceroom.get_inc_log(1).$type.get_inc_log(1).$staffid;
	$title='修改会议信息';
	get_oa_log_dbadd($id,$content,$title,19,$_USER->id);
	goto_page('admin.php?ac=index&fileurl=conference');
	

}

?>